"""正着来算斐波那契数列，规定最大值设置返回值
def func(total):
    result = [0, 1, 1]
    num = 1
    v = 2
    while True:
        val = result[num] + result[v]
        num += 1
        v += 1
        result.append(val)
        print(result)
        if val >= total :
            break
    return val
v1 = func(50)
print(v1)
"""
"""反着来算斐波那契数列，规定最大值设置返回值
def func(total):
    result = [0, 1, 1]
    while True:
        val = result[-2] + result[-1]
        result.append(val)
        print(result)
        if val >= total :
            break
    return val
v1 = func(50)
print(v1)
"""

"""
def func(total):
    result = [0, 1, 1]
    if result[-1] != 1:
        result.append(1)
    elif result[-2] != 1:
        result.append(1)
    while True:
        val = result[-2] + result[-1]
        result.append(val)
        print(result)
        if val >= total:
            break
    return val


v1 = func(50)
print(v1)
"""

"""
def func(a1, *args):
    pass
    print(a1, *args)


func(1, 'asda', 123)
"""
"""

a = 1


def s1():
    x1 = 999
    print(x1)
    print(a)
    print(b)


b = 789
s1()


def s2():
    c1 = 111
    print(c1)
    print(s1)
    print(a)


s2()
"""
"""
name = [1, 2, 3, 4]


def func():
    name.append(123)
    print(name)


func()
"""
"""
name = 'zkyandyouda'
val = 'wdade'


def func():
    global name, val
    name = 'wjq'
    val = 'wjqshiyouda'
    count = 'sadad'

    def inner():
        nonlocal count
        count = 'qwe'
        print(count)

    inner()

    print(name, val)


func()
print(name)
"""

"""
函数做面试题，把函数做字典的值
def func():
    print('话费查询')


def bar():
    print('语音')


def base():
    print('xxx')


def show():
    print('zzz')


def test():
    print('ccc')


info = {'f1':func,
        'f2':bar,
        'f3':base,
        'f4':show,
        'f5':test,
        }
choice = input('请选择功能：')
functions = info.get(choice,'输入错误')
print(functions)
考察字典，以及字典的get用法
"""
"""
DATA = 100


def func():
    pass
    DATA = 100
    func2 = lambda a: a + DATA


    func2(1)
    return func2(1)
v = func()
print(v)
"""